package com.xpqh.ksg.common.persistence.dao;

import com.xpqh.ksg.common.persistence.model.KsgSeriesInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xpqh.ksg.modular.core.dto.CarLvInfo;
import com.xpqh.ksg.modular.core.dto.KsgSeriesInfoRespDTO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 车型表 Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2025-04-18
 */
public interface KsgSeriesInfoMapper extends BaseMapper<KsgSeriesInfo> {

    @Select("select brand_id brandId,series_name seriesName,car_lv  carLv,car_type carType,price_lv priceLv,id,series_picture seriesPicture  from ksg_series_info where brand_id = #{brandId} order by sort asc")
    List<KsgSeriesInfoRespDTO> getSeriesList(@Param("brandId")String brandId);

    @Select("select car_lv carLv,price_lv priceLv from ksg_series_info a where a.id = #{carSeriesId}")
    CarLvInfo getCarLvInfo(@Param("carSeriesId")String carSeriesId);

}

